package com.globalwave.system.vo
{
    import mx.collections.ArrayCollection;
  
    public class User
    {
        public var user_id : int  ;
        public var login_id : String ;
        public var password_ : String ;
        public var name_ : String ;
        public var email_ : String ;
        //private String region_ ;
        public var status_ : String ;
        public var desc_ : String ;
        
        public var privilegeIds : ArrayCollection ;
            
        public const isValidatePrivilege : Boolean = true ;
        
        public function User() {
            this.privilegeIds = new ArrayCollection() ;
        }
            
        public function hasPrivilege(pid : Object) : Boolean {
            if (!isValidatePrivilege || pid == null || pid == "" || int(pid) == -1) {
                return true ;
            }
            
            return this.privilegeIds.contains(int(pid)) ;
        }    
    }
}